Hi Josh,
It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.
http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
I can't think of a simple solution.
When you were driving with the LPT what pulse width were you using?
Regards TK
Group: DynoMotion |
Message: 5299 |
From: inbilla |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Tom,
Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
Thanks Tom
Josh
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Josh,
>
> It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
>
>
> http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
>
> I can't think of a simple solution.
>
>
> When you were driving with the LPT what pulse width were you using?
>
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: inbilla <inbilla@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, June 22, 2012 11:27 PM
> Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
>
>
> Â
> Hi There,
>
> I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
>
> I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
>
> I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
>
> I currently have one axis configured. The following is the C code for that:
>
> ch0->InputMode=NO_INPUT_MODE;
> ch0->OutputMode=STEP_DIR_MODE;
> ch0->Vel=3000;
> ch0->Accel=2e+005;
> ch0->Jerk=1e+008;
> ch0->P=0;
> ch0->I=0.01;
> ch0->D=0;
> ch0->FFAccel=0;
> ch0->FFVel=0;
> ch0->MaxI=200;
> ch0->MaxErr=1e+006;
> ch0->MaxOutput=200;
> ch0->DeadBandGain=1;
> ch0->DeadBandRange=0;
> ch0->InputChan0=0;
> ch0->InputChan1=0;
> ch0->OutputChan0=8;
> ch0->OutputChan1=0;
> ch0->MasterAxis=-1;
> ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> ch0->InputGain0=1;
> ch0->InputGain1=1;
> ch0->InputOffset0=0;
> ch0->InputOffset1=0;
> ch0->OutputGain=-1;
> ch0->OutputOffset=0;
> ch0->SlaveGain=1;
> ch0->BacklashMode=BACKLASH_OFF;
> ch0->BacklashAmount=549;
> ch0->BacklashRate=1;
> ch0->invDistPerCycle=1;
> ch0->Lead=0;
> ch0->MaxFollowingError=1000000000;
> ch0->StepperAmplitude=20;
>
> ch0->iir[0].B0=1;
> ch0->iir[0].B1=0;
> ch0->iir[0].B2=0;
> ch0->iir[0].A1=0;
> ch0->iir[0].A2=0;
>
> ch0->iir[1].B0=1;
> ch0->iir[1].B1=0;
> ch0->iir[1].B2=0;
> ch0->iir[1].A1=0;
> ch0->iir[1].A2=0;
>
> ch0->iir[2].B0=0.000769;
> ch0->iir[2].B1=0.001538;
> ch0->iir[2].B2=0.000769;
> ch0->iir[2].A1=1.92076;
> ch0->iir[2].A2=-0.923833;
>
> I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
>
> FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
>
> I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
>
> I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
>
> I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
>
> Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
>
> I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
>
> Any help or suggestions would be appreciated!
> Thanks
>
> Josh
>
|
|
Group: DynoMotion |
Message: 5300 |
From: inbilla |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
--- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@...> wrote:
>
> Hi Tom,
>
> Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
>
> I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
>
> Thanks Tom
>
> Josh
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Josh,
> >
> > It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
> >
> >
> > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> >
> > I can't think of a simple solution.
> >
> >
> > When you were driving with the LPT what pulse width were you using?
> >
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: inbilla <inbilla@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, June 22, 2012 11:27 PM
> > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> >
> >
> > Â
> > Hi There,
> >
> > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> >
> > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> >
> > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> >
> > I currently have one axis configured. The following is the C code for that:
> >
> > ch0->InputMode=NO_INPUT_MODE;
> > ch0->OutputMode=STEP_DIR_MODE;
> > ch0->Vel=3000;
> > ch0->Accel=2e+005;
> > ch0->Jerk=1e+008;
> > ch0->P=0;
> > ch0->I=0.01;
> > ch0->D=0;
> > ch0->FFAccel=0;
> > ch0->FFVel=0;
> > ch0->MaxI=200;
> > ch0->MaxErr=1e+006;
> > ch0->MaxOutput=200;
> > ch0->DeadBandGain=1;
> > ch0->DeadBandRange=0;
> > ch0->InputChan0=0;
> > ch0->InputChan1=0;
> > ch0->OutputChan0=8;
> > ch0->OutputChan1=0;
> > ch0->MasterAxis=-1;
> > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > ch0->InputGain0=1;
> > ch0->InputGain1=1;
> > ch0->InputOffset0=0;
> > ch0->InputOffset1=0;
> > ch0->OutputGain=-1;
> > ch0->OutputOffset=0;
> > ch0->SlaveGain=1;
> > ch0->BacklashMode=BACKLASH_OFF;
> > ch0->BacklashAmount=549;
> > ch0->BacklashRate=1;
> > ch0->invDistPerCycle=1;
> > ch0->Lead=0;
> > ch0->MaxFollowingError=1000000000;
> > ch0->StepperAmplitude=20;
> >
> > ch0->iir[0].B0=1;
> > ch0->iir[0].B1=0;
> > ch0->iir[0].B2=0;
> > ch0->iir[0].A1=0;
> > ch0->iir[0].A2=0;
> >
> > ch0->iir[1].B0=1;
> > ch0->iir[1].B1=0;
> > ch0->iir[1].B2=0;
> > ch0->iir[1].A1=0;
> > ch0->iir[1].A2=0;
> >
> > ch0->iir[2].B0=0.000769;
> > ch0->iir[2].B1=0.001538;
> > ch0->iir[2].B2=0.000769;
> > ch0->iir[2].A1=1.92076;
> > ch0->iir[2].A2=-0.923833;
> >
> > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> >
> > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> >
> > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> >
> > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> >
> > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> >
> > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> >
> > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> >
> > Any help or suggestions would be appreciated!
> > Thanks
> >
> > Josh
> >
>
|
|
Group: DynoMotion |
Message: 5301 |
From: himykabibble |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@...> wrote:
>
> On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
>
> I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
>
>
> --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> >
> > Hi Tom,
> >
> > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> >
> > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> >
> > Thanks Tom
> >
> > Josh
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Josh,
> > >
> > > It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
> > >
> > >
> > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > >
> > > I can't think of a simple solution.
> > >
> > >
> > > When you were driving with the LPT what pulse width were you using?
> > >
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: inbilla <inbilla@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, June 22, 2012 11:27 PM
> > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > >
> > >
> > > Â
> > > Hi There,
> > >
> > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > >
> > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > >
> > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > >
> > > I currently have one axis configured. The following is the C code for that:
> > >
> > > ch0->InputMode=NO_INPUT_MODE;
> > > ch0->OutputMode=STEP_DIR_MODE;
> > > ch0->Vel=3000;
> > > ch0->Accel=2e+005;
> > > ch0->Jerk=1e+008;
> > > ch0->P=0;
> > > ch0->I=0.01;
> > > ch0->D=0;
> > > ch0->FFAccel=0;
> > > ch0->FFVel=0;
> > > ch0->MaxI=200;
> > > ch0->MaxErr=1e+006;
> > > ch0->MaxOutput=200;
> > > ch0->DeadBandGain=1;
> > > ch0->DeadBandRange=0;
> > > ch0->InputChan0=0;
> > > ch0->InputChan1=0;
> > > ch0->OutputChan0=8;
> > > ch0->OutputChan1=0;
> > > ch0->MasterAxis=-1;
> > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > ch0->InputGain0=1;
> > > ch0->InputGain1=1;
> > > ch0->InputOffset0=0;
> > > ch0->InputOffset1=0;
> > > ch0->OutputGain=-1;
> > > ch0->OutputOffset=0;
> > > ch0->SlaveGain=1;
> > > ch0->BacklashMode=BACKLASH_OFF;
> > > ch0->BacklashAmount=549;
> > > ch0->BacklashRate=1;
> > > ch0->invDistPerCycle=1;
> > > ch0->Lead=0;
> > > ch0->MaxFollowingError=1000000000;
> > > ch0->StepperAmplitude=20;
> > >
> > > ch0->iir[0].B0=1;
> > > ch0->iir[0].B1=0;
> > > ch0->iir[0].B2=0;
> > > ch0->iir[0].A1=0;
> > > ch0->iir[0].A2=0;
> > >
> > > ch0->iir[1].B0=1;
> > > ch0->iir[1].B1=0;
> > > ch0->iir[1].B2=0;
> > > ch0->iir[1].A1=0;
> > > ch0->iir[1].A2=0;
> > >
> > > ch0->iir[2].B0=0.000769;
> > > ch0->iir[2].B1=0.001538;
> > > ch0->iir[2].B2=0.000769;
> > > ch0->iir[2].A1=1.92076;
> > > ch0->iir[2].A2=-0.923833;
> > >
> > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > >
> > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > >
> > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > >
> > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > >
> > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > >
> > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > >
> > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > >
> > > Any help or suggestions would be appreciated!
> > > Thanks
> > >
> > > Josh
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5302 |
From: inbilla |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Yeah, it's really strange.
I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
This isn't really making sense.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> >
> > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> >
> > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> >
> >
> > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > >
> > > Hi Tom,
> > >
> > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > >
> > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > >
> > > Thanks Tom
> > >
> > > Josh
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Josh,
> > > >
> > > > It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
> > > >
> > > >
> > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > >
> > > > I can't think of a simple solution.
> > > >
> > > >
> > > > When you were driving with the LPT what pulse width were you using?
> > > >
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: inbilla <inbilla@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > >
> > > >
> > > > Â
> > > > Hi There,
> > > >
> > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > >
> > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > >
> > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > >
> > > > I currently have one axis configured. The following is the C code for that:
> > > >
> > > > ch0->InputMode=NO_INPUT_MODE;
> > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > ch0->Vel=3000;
> > > > ch0->Accel=2e+005;
> > > > ch0->Jerk=1e+008;
> > > > ch0->P=0;
> > > > ch0->I=0.01;
> > > > ch0->D=0;
> > > > ch0->FFAccel=0;
> > > > ch0->FFVel=0;
> > > > ch0->MaxI=200;
> > > > ch0->MaxErr=1e+006;
> > > > ch0->MaxOutput=200;
> > > > ch0->DeadBandGain=1;
> > > > ch0->DeadBandRange=0;
> > > > ch0->InputChan0=0;
> > > > ch0->InputChan1=0;
> > > > ch0->OutputChan0=8;
> > > > ch0->OutputChan1=0;
> > > > ch0->MasterAxis=-1;
> > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > ch0->InputGain0=1;
> > > > ch0->InputGain1=1;
> > > > ch0->InputOffset0=0;
> > > > ch0->InputOffset1=0;
> > > > ch0->OutputGain=-1;
> > > > ch0->OutputOffset=0;
> > > > ch0->SlaveGain=1;
> > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > ch0->BacklashAmount=549;
> > > > ch0->BacklashRate=1;
> > > > ch0->invDistPerCycle=1;
> > > > ch0->Lead=0;
> > > > ch0->MaxFollowingError=1000000000;
> > > > ch0->StepperAmplitude=20;
> > > >
> > > > ch0->iir[0].B0=1;
> > > > ch0->iir[0].B1=0;
> > > > ch0->iir[0].B2=0;
> > > > ch0->iir[0].A1=0;
> > > > ch0->iir[0].A2=0;
> > > >
> > > > ch0->iir[1].B0=1;
> > > > ch0->iir[1].B1=0;
> > > > ch0->iir[1].B2=0;
> > > > ch0->iir[1].A1=0;
> > > > ch0->iir[1].A2=0;
> > > >
> > > > ch0->iir[2].B0=0.000769;
> > > > ch0->iir[2].B1=0.001538;
> > > > ch0->iir[2].B2=0.000769;
> > > > ch0->iir[2].A1=1.92076;
> > > > ch0->iir[2].A2=-0.923833;
> > > >
> > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > >
> > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > >
> > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > >
> > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > >
> > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > >
> > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > >
> > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > >
> > > > Any help or suggestions would be appreciated!
> > > > Thanks
> > > >
> > > > Josh
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5303 |
From: himykabibble |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Have you tried flipping the polarity?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@...> wrote:
>
> Yeah, it's really strange.
>
> I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
>
> This isn't really making sense.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > >
> > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > >
> > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > >
> > > > Hi Tom,
> > > >
> > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > >
> > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > >
> > > > Thanks Tom
> > > >
> > > > Josh
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Josh,
> > > > >
> > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
> > > > >
> > > > >
> > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > >
> > > > > I can't think of a simple solution.
> > > > >
> > > > >
> > > > > When you were driving with the LPT what pulse width were you using?
> > > > >
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: inbilla <inbilla@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > >
> > > > >
> > > > > Â
> > > > > Hi There,
> > > > >
> > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > >
> > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > >
> > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > >
> > > > > I currently have one axis configured. The following is the C code for that:
> > > > >
> > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > ch0->Vel=3000;
> > > > > ch0->Accel=2e+005;
> > > > > ch0->Jerk=1e+008;
> > > > > ch0->P=0;
> > > > > ch0->I=0.01;
> > > > > ch0->D=0;
> > > > > ch0->FFAccel=0;
> > > > > ch0->FFVel=0;
> > > > > ch0->MaxI=200;
> > > > > ch0->MaxErr=1e+006;
> > > > > ch0->MaxOutput=200;
> > > > > ch0->DeadBandGain=1;
> > > > > ch0->DeadBandRange=0;
> > > > > ch0->InputChan0=0;
> > > > > ch0->InputChan1=0;
> > > > > ch0->OutputChan0=8;
> > > > > ch0->OutputChan1=0;
> > > > > ch0->MasterAxis=-1;
> > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > ch0->InputGain0=1;
> > > > > ch0->InputGain1=1;
> > > > > ch0->InputOffset0=0;
> > > > > ch0->InputOffset1=0;
> > > > > ch0->OutputGain=-1;
> > > > > ch0->OutputOffset=0;
> > > > > ch0->SlaveGain=1;
> > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > ch0->BacklashAmount=549;
> > > > > ch0->BacklashRate=1;
> > > > > ch0->invDistPerCycle=1;
> > > > > ch0->Lead=0;
> > > > > ch0->MaxFollowingError=1000000000;
> > > > > ch0->StepperAmplitude=20;
> > > > >
> > > > > ch0->iir[0].B0=1;
> > > > > ch0->iir[0].B1=0;
> > > > > ch0->iir[0].B2=0;
> > > > > ch0->iir[0].A1=0;
> > > > > ch0->iir[0].A2=0;
> > > > >
> > > > > ch0->iir[1].B0=1;
> > > > > ch0->iir[1].B1=0;
> > > > > ch0->iir[1].B2=0;
> > > > > ch0->iir[1].A1=0;
> > > > > ch0->iir[1].A2=0;
> > > > >
> > > > > ch0->iir[2].B0=0.000769;
> > > > > ch0->iir[2].B1=0.001538;
> > > > > ch0->iir[2].B2=0.000769;
> > > > > ch0->iir[2].A1=1.92076;
> > > > > ch0->iir[2].A2=-0.923833;
> > > > >
> > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > >
> > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > >
> > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > >
> > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > >
> > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > >
> > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > >
> > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > >
> > > > > Any help or suggestions would be appreciated!
> > > > > Thanks
> > > > >
> > > > > Josh
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5304 |
From: inbilla |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Thanks for the thoughts,
Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
Josh
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Have you tried flipping the polarity?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> >
> > Yeah, it's really strange.
> >
> > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> >
> > This isn't really making sense.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > >
> > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > >
> > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > >
> > > > > Hi Tom,
> > > > >
> > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > >
> > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > >
> > > > > Thanks Tom
> > > > >
> > > > > Josh
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Josh,
> > > > > >
> > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
> > > > > >
> > > > > >
> > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > >
> > > > > > I can't think of a simple solution.
> > > > > >
> > > > > >
> > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > >
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: inbilla <inbilla@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > >
> > > > > >
> > > > > > Â
> > > > > > Hi There,
> > > > > >
> > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > >
> > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > >
> > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > >
> > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > >
> > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > ch0->Vel=3000;
> > > > > > ch0->Accel=2e+005;
> > > > > > ch0->Jerk=1e+008;
> > > > > > ch0->P=0;
> > > > > > ch0->I=0.01;
> > > > > > ch0->D=0;
> > > > > > ch0->FFAccel=0;
> > > > > > ch0->FFVel=0;
> > > > > > ch0->MaxI=200;
> > > > > > ch0->MaxErr=1e+006;
> > > > > > ch0->MaxOutput=200;
> > > > > > ch0->DeadBandGain=1;
> > > > > > ch0->DeadBandRange=0;
> > > > > > ch0->InputChan0=0;
> > > > > > ch0->InputChan1=0;
> > > > > > ch0->OutputChan0=8;
> > > > > > ch0->OutputChan1=0;
> > > > > > ch0->MasterAxis=-1;
> > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > ch0->InputGain0=1;
> > > > > > ch0->InputGain1=1;
> > > > > > ch0->InputOffset0=0;
> > > > > > ch0->InputOffset1=0;
> > > > > > ch0->OutputGain=-1;
> > > > > > ch0->OutputOffset=0;
> > > > > > ch0->SlaveGain=1;
> > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > ch0->BacklashAmount=549;
> > > > > > ch0->BacklashRate=1;
> > > > > > ch0->invDistPerCycle=1;
> > > > > > ch0->Lead=0;
> > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > ch0->StepperAmplitude=20;
> > > > > >
> > > > > > ch0->iir[0].B0=1;
> > > > > > ch0->iir[0].B1=0;
> > > > > > ch0->iir[0].B2=0;
> > > > > > ch0->iir[0].A1=0;
> > > > > > ch0->iir[0].A2=0;
> > > > > >
> > > > > > ch0->iir[1].B0=1;
> > > > > > ch0->iir[1].B1=0;
> > > > > > ch0->iir[1].B2=0;
> > > > > > ch0->iir[1].A1=0;
> > > > > > ch0->iir[1].A2=0;
> > > > > >
> > > > > > ch0->iir[2].B0=0.000769;
> > > > > > ch0->iir[2].B1=0.001538;
> > > > > > ch0->iir[2].B2=0.000769;
> > > > > > ch0->iir[2].A1=1.92076;
> > > > > > ch0->iir[2].A2=-0.923833;
> > > > > >
> > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > >
> > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > >
> > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > >
> > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > >
> > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > >
> > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > >
> > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > >
> > > > > > Any help or suggestions would be appreciated!
> > > > > > Thanks
> > > > > >
> > > > > > Josh
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5305 |
From: himykabibble |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
But if it works with a narrow pulse on Mach3, there's no reason it should not work with KFlop, unless there's an electrical problem. Have you looked at the waveforms with an o-scope? Perhaps stiff pull-up resistors might help?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@...> wrote:
>
> Thanks for the thoughts,
>
> Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
>
> Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
>
> The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
>
> Josh
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Have you tried flipping the polarity?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > >
> > > Yeah, it's really strange.
> > >
> > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > >
> > > This isn't really making sense.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > >
> > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > >
> > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > >
> > > > > > Hi Tom,
> > > > > >
> > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > >
> > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > >
> > > > > > Thanks Tom
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Josh,
> > > > > > >
> > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
> > > > > > >
> > > > > > >
> > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > >
> > > > > > > I can't think of a simple solution.
> > > > > > >
> > > > > > >
> > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > >
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: inbilla <inbilla@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > >
> > > > > > >
> > > > > > > Â
> > > > > > > Hi There,
> > > > > > >
> > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > >
> > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > >
> > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > >
> > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > >
> > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > ch0->Vel=3000;
> > > > > > > ch0->Accel=2e+005;
> > > > > > > ch0->Jerk=1e+008;
> > > > > > > ch0->P=0;
> > > > > > > ch0->I=0.01;
> > > > > > > ch0->D=0;
> > > > > > > ch0->FFAccel=0;
> > > > > > > ch0->FFVel=0;
> > > > > > > ch0->MaxI=200;
> > > > > > > ch0->MaxErr=1e+006;
> > > > > > > ch0->MaxOutput=200;
> > > > > > > ch0->DeadBandGain=1;
> > > > > > > ch0->DeadBandRange=0;
> > > > > > > ch0->InputChan0=0;
> > > > > > > ch0->InputChan1=0;
> > > > > > > ch0->OutputChan0=8;
> > > > > > > ch0->OutputChan1=0;
> > > > > > > ch0->MasterAxis=-1;
> > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > ch0->InputGain0=1;
> > > > > > > ch0->InputGain1=1;
> > > > > > > ch0->InputOffset0=0;
> > > > > > > ch0->InputOffset1=0;
> > > > > > > ch0->OutputGain=-1;
> > > > > > > ch0->OutputOffset=0;
> > > > > > > ch0->SlaveGain=1;
> > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > ch0->BacklashAmount=549;
> > > > > > > ch0->BacklashRate=1;
> > > > > > > ch0->invDistPerCycle=1;
> > > > > > > ch0->Lead=0;
> > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > ch0->StepperAmplitude=20;
> > > > > > >
> > > > > > > ch0->iir[0].B0=1;
> > > > > > > ch0->iir[0].B1=0;
> > > > > > > ch0->iir[0].B2=0;
> > > > > > > ch0->iir[0].A1=0;
> > > > > > > ch0->iir[0].A2=0;
> > > > > > >
> > > > > > > ch0->iir[1].B0=1;
> > > > > > > ch0->iir[1].B1=0;
> > > > > > > ch0->iir[1].B2=0;
> > > > > > > ch0->iir[1].A1=0;
> > > > > > > ch0->iir[1].A2=0;
> > > > > > >
> > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > >
> > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > >
> > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > >
> > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > >
> > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > >
> > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > >
> > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > >
> > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > >
> > > > > > > Any help or suggestions would be appreciated!
> > > > > > > Thanks
> > > > > > >
> > > > > > > Josh
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5306 |
From: inbilla |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Yeah, the narrow pulse in Mach3 that it 'worked' with was idle high and pulse low. It was also using microstepping at the time of that post, when I turned microstepping off, the motor revealed that it was still out of control.
The waveforms on an oscope look fine, though the LPT and the KFLOP are outputing 3.3v. Their pulse sizes look identical, 4us looks to be pretty standard, and many people seem to be able to get this driver board working via Mach3 at least... or they think it's working because they have microstepping turned up, and can't see the steps they're missing?
Pull up resistors may help, I initially had some transistors between the KFLOP and the driver, the LPT cable is a little harder to intercept though.
What configuration do you suggest with the pull up resistors?
resistor between output and 5v? 10k? 1k?
Thanks
Josh
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> But if it works with a narrow pulse on Mach3, there's no reason it should not work with KFlop, unless there's an electrical problem. Have you looked at the waveforms with an o-scope? Perhaps stiff pull-up resistors might help?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> >
> > Thanks for the thoughts,
> >
> > Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
> >
> > Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
> >
> > The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
> >
> > Josh
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Have you tried flipping the polarity?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > >
> > > > Yeah, it's really strange.
> > > >
> > > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > > >
> > > > This isn't really making sense.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > >
> > > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > > >
> > > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > >
> > > > > > > Hi Tom,
> > > > > > >
> > > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > > >
> > > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > > >
> > > > > > > Thanks Tom
> > > > > > >
> > > > > > > Josh
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Josh,
> > > > > > > >
> > > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us. KFLOP has a max step pulse time of 3.78us.Â
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > > >
> > > > > > > > I can't think of a simple solution.
> > > > > > > >
> > > > > > > >
> > > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > > >
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: inbilla <inbilla@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > > >
> > > > > > > >
> > > > > > > > Â
> > > > > > > > Hi There,
> > > > > > > >
> > > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > > >
> > > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > > >
> > > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > > >
> > > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > > >
> > > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > > ch0->Vel=3000;
> > > > > > > > ch0->Accel=2e+005;
> > > > > > > > ch0->Jerk=1e+008;
> > > > > > > > ch0->P=0;
> > > > > > > > ch0->I=0.01;
> > > > > > > > ch0->D=0;
> > > > > > > > ch0->FFAccel=0;
> > > > > > > > ch0->FFVel=0;
> > > > > > > > ch0->MaxI=200;
> > > > > > > > ch0->MaxErr=1e+006;
> > > > > > > > ch0->MaxOutput=200;
> > > > > > > > ch0->DeadBandGain=1;
> > > > > > > > ch0->DeadBandRange=0;
> > > > > > > > ch0->InputChan0=0;
> > > > > > > > ch0->InputChan1=0;
> > > > > > > > ch0->OutputChan0=8;
> > > > > > > > ch0->OutputChan1=0;
> > > > > > > > ch0->MasterAxis=-1;
> > > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > > ch0->InputGain0=1;
> > > > > > > > ch0->InputGain1=1;
> > > > > > > > ch0->InputOffset0=0;
> > > > > > > > ch0->InputOffset1=0;
> > > > > > > > ch0->OutputGain=-1;
> > > > > > > > ch0->OutputOffset=0;
> > > > > > > > ch0->SlaveGain=1;
> > > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > > ch0->BacklashAmount=549;
> > > > > > > > ch0->BacklashRate=1;
> > > > > > > > ch0->invDistPerCycle=1;
> > > > > > > > ch0->Lead=0;
> > > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > > ch0->StepperAmplitude=20;
> > > > > > > >
> > > > > > > > ch0->iir[0].B0=1;
> > > > > > > > ch0->iir[0].B1=0;
> > > > > > > > ch0->iir[0].B2=0;
> > > > > > > > ch0->iir[0].A1=0;
> > > > > > > > ch0->iir[0].A2=0;
> > > > > > > >
> > > > > > > > ch0->iir[1].B0=1;
> > > > > > > > ch0->iir[1].B1=0;
> > > > > > > > ch0->iir[1].B2=0;
> > > > > > > > ch0->iir[1].A1=0;
> > > > > > > > ch0->iir[1].A2=0;
> > > > > > > >
> > > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > > >
> > > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > > >
> > > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > > >
> > > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > > >
> > > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > > >
> > > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > > >
> > > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > > >
> > > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > > >
> > > > > > > > Any help or suggestions would be appreciated!
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > Josh
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5307 |
From: Tom Kerekes |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Josh,
It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing. I couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates). For various reasons it turns out to be not easy to do. Not only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
I was thinking one thing you might try is Quadrature Output Mode. It is selected by adding 8 to the OutputChan0 number. This would basically output a square wave so the pulses would be large. You would lose the direction signal. But for a test you could just disconnect it and wire it to an unused Output and move one direction. If it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the direction. I'm not certain there wouldn't be a flaw where some motion timing scenario would cause a Step in the wrong direction, but it seems to me it would work. The KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash). This means that when stepping in one direction the trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite direction. The trajectory must reverse at least 1/8th of a Step (microstep). So for your relatively slow stepping rates this should give enough time. Assuming:
10 KHz max microstep rate
acceleration to full speed happens in 1/4 sec
This is 40000 steps/sec^2 acceleration rate.
The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
using acceleration formula:
distance = 1/2 Acceleration x Time^2
1/8 = 1/2 x 40000 t^2
t = 0.0025 seconds = 2500 us
Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
Regards
TK
Group: DynoMotion |
Message: 5308 |
From: inbilla |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Tom,
There aren't any optocouplers on the inputs. There is a 74HC14 on the board, so I assume the inputs are being buffered through that. Though its possible it may only be used to buffer the outputs.
Regarding the firmware, there isn't any way that I can mod and build my own firmware is there? The source for the firmware isn't available is it? It wouldn't be my first experience with FPGA's and micros... I recognise though that keeping your current features and implementing mine may be too much to ask.
Regarding the Quadrature output. Its worth a shot... but I was under the impression quadrature stepping would step on both a rising and a falling edge of the signal? Is that right? In which case, the driver board would ignore half the steps generated... I've tried looking into it, but nothing seems to come up when I search online for an actual definition of how quadrature mode works to confirm.
Thanks for your thoughts, I appreciate your patience
Josh
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Josh,
> Â
> It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing. I couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
> Â
> But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates). For various reasons it turns out to be not easy to do. Not only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
> Â
> I was thinking one thing you might try is Quadrature Output Mode. It is selected by adding 8 to the OutputChan0 number. This would basically output a square wave so the pulses would be large. You would lose the direction signal. But for a test you could just disconnect it and wire it to an unused Output and move one direction. If it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the direction. I'm not certain there wouldn't be a flaw where some motion timing scenario would cause a Step in the wrong direction, but it seems to me it would work. The KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash). This means that when stepping in one direction the trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite direction. The trajectory must reverse at least 1/8th of a Step
> (microstep). So for your relatively slow stepping rates this should give enough time. Assuming:
> Â
> 10 KHz max microstep rate
> acceleration to full speed happens in 1/4 sec
> Â
> This is 40000 steps/sec^2 acceleration rate.
> Â
> The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
> Â
> using acceleration formula:
> Â
> distance = 1/2 Acceleration x Time^2
> Â
> 1/8 = 1/2 x 40000 t^2
> Â
> t = 0.0025 seconds = 2500 us
> Â
> Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
> Â
> Regards
> TKÂ
> Â
> Â
> Â
>
> From: inbilla <inbilla@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, June 23, 2012 10:45 AM
> Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
>
>
> Â
> Thanks for the thoughts,
>
> Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
>
> Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
>
> The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
>
> Josh
>
> --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Have you tried flipping the polarity?
> >
> > Regards,
> > Ray L.
> >
> > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > >
> > > Yeah, it's really strange.
> > >
> > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > >
> > > This isn't really making sense.
> > >
> > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > >
> > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > >
> > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > >
> > > > >
> > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > >
> > > > > > Hi Tom,
> > > > > >
> > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > >
> > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > >
> > > > > > Thanks Tom
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Josh,
> > > > > > >
> > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us.ÃÂ KFLOP has a max step pulse time of 3.78us.ÃÂ
> > > > > > >
> > > > > > >
> > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > >
> > > > > > > I can't think of a simple solution.
> > > > > > >
> > > > > > >
> > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > >
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: inbilla <inbilla@>
> > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > >
> > > > > > >
> > > > > > > ÃÂ
> > > > > > > Hi There,
> > > > > > >
> > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > >
> > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > >
> > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > >
> > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > >
> > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > ch0->Vel=3000;
> > > > > > > ch0->Accel=2e+005;
> > > > > > > ch0->Jerk=1e+008;
> > > > > > > ch0->P=0;
> > > > > > > ch0->I=0.01;
> > > > > > > ch0->D=0;
> > > > > > > ch0->FFAccel=0;
> > > > > > > ch0->FFVel=0;
> > > > > > > ch0->MaxI=200;
> > > > > > > ch0->MaxErr=1e+006;
> > > > > > > ch0->MaxOutput=200;
> > > > > > > ch0->DeadBandGain=1;
> > > > > > > ch0->DeadBandRange=0;
> > > > > > > ch0->InputChan0=0;
> > > > > > > ch0->InputChan1=0;
> > > > > > > ch0->OutputChan0=8;
> > > > > > > ch0->OutputChan1=0;
> > > > > > > ch0->MasterAxis=-1;
> > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > ch0->InputGain0=1;
> > > > > > > ch0->InputGain1=1;
> > > > > > > ch0->InputOffset0=0;
> > > > > > > ch0->InputOffset1=0;
> > > > > > > ch0->OutputGain=-1;
> > > > > > > ch0->OutputOffset=0;
> > > > > > > ch0->SlaveGain=1;
> > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > ch0->BacklashAmount=549;
> > > > > > > ch0->BacklashRate=1;
> > > > > > > ch0->invDistPerCycle=1;
> > > > > > > ch0->Lead=0;
> > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > ch0->StepperAmplitude=20;
> > > > > > >
> > > > > > > ch0->iir[0].B0=1;
> > > > > > > ch0->iir[0].B1=0;
> > > > > > > ch0->iir[0].B2=0;
> > > > > > > ch0->iir[0].A1=0;
> > > > > > > ch0->iir[0].A2=0;
> > > > > > >
> > > > > > > ch0->iir[1].B0=1;
> > > > > > > ch0->iir[1].B1=0;
> > > > > > > ch0->iir[1].B2=0;
> > > > > > > ch0->iir[1].A1=0;
> > > > > > > ch0->iir[1].A2=0;
> > > > > > >
> > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > >
> > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > >
> > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > >
> > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > >
> > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > >
> > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > >
> > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > >
> > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > >
> > > > > > > Any help or suggestions would be appreciated!
> > > > > > > Thanks
> > > > > > >
> > > > > > > Josh
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5309 |
From: Tom Kerekes |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Josh,
Actually with normal Quadrature each "Step" makes one quadrature transition and it takes 4 of those to go through a complete A and B quadrature cycle. Using just one of the phases into your driver would only make one step every complete cycle. So you would need to move 4X the distance (in steps) and at 4X the speed but that should not be a problem.
Regards TK
Group: DynoMotion |
Message: 5310 |
From: himykabibble |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Tom,
Where would the direction signal come from?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Josh,
>
> Actually with normal Quadrature each "Step" makes one quadrature transition and it takes 4 of those to go through a complete A and B quadrature cycle. Using just one of the phases into your driver would only make one step every complete cycle. So you would need to move 4X the distance (in steps) and at 4X the speed but that should not be a problem.
>
> Regards
> TK
>
>
>
> ________________________________
> From: inbilla <inbilla@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, June 23, 2012 6:21 PM
> Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
>
>
> Â
> Hi Tom,
>
> There aren't any optocouplers on the inputs. There is a 74HC14 on the board, so I assume the inputs are being buffered through that. Though its possible it may only be used to buffer the outputs.
>
> Regarding the firmware, there isn't any way that I can mod and build my own firmware is there? The source for the firmware isn't available is it? It wouldn't be my first experience with FPGA's and micros... I recognise though that keeping your current features and implementing mine may be too much to ask.
>
> Regarding the Quadrature output. Its worth a shot... but I was under the impression quadrature stepping would step on both a rising and a falling edge of the signal? Is that right? In which case, the driver board would ignore half the steps generated... I've tried looking into it, but nothing seems to come up when I search online for an actual definition of how quadrature mode works to confirm.
>
> Thanks for your thoughts, I appreciate your patience
>
> Josh
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Josh,
> > ÃÂ
> > It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing.ÃÂ I couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
> > ÃÂ
> > But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates).ÃÂ For various reasons it turns out to be not easy to do.ÃÂ Not only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
> > ÃÂ
> > I was thinking one thing you might try is Quadrature Output Mode.ÃÂ It is selected by adding 8 to the OutputChan0 number.ÃÂ This would basically output a square wave so the pulses would be large.ÃÂ You would lose the direction signal.ÃÂ But for a test you could just disconnect it and wire it to an unused Output and move one direction.ÃÂ If it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the direction.ÃÂ I'm not certain there wouldn't be a flaw where some motion timingÃÂ scenario would cause a Step in the wrong direction, but it seems to me it would work.ÃÂ The KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash).ÃÂ This means that when stepping in one direction the trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite direction.ÃÂ The trajectory must reverse at least
> 1/8th of a Step
> > (microstep).ÃÂ So for your relatively slow steppingÃÂ rates this should give enough time.ÃÂ Assuming:
> > ÃÂ
> > 10 KHz max microstep rate
> > acceleration to full speed happens in 1/4 sec
> > ÃÂ
> > This is 40000 steps/sec^2 acceleration rate.
> > ÃÂ
> > The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
> > ÃÂ
> > using acceleration formula:
> > ÃÂ
> > distance = 1/2 Acceleration x Time^2
> > ÃÂ
> > 1/8 = 1/2 x 40000 t^2
> > ÃÂ
> > t = 0.0025 seconds = 2500 us
> > ÃÂ
> > Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
> > ÃÂ
> > Regards
> > TKÃÂ
> > ÃÂ
> > ÃÂ
> > ÃÂ
> >
> > From: inbilla <inbilla@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, June 23, 2012 10:45 AM
> > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> >
> >
> > ÃÂ
> > Thanks for the thoughts,
> >
> > Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
> >
> > Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
> >
> > The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
> >
> > Josh
> >
> > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Have you tried flipping the polarity?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > >
> > > > Yeah, it's really strange.
> > > >
> > > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > > >
> > > > This isn't really making sense.
> > > >
> > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > >
> > > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > > >
> > > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > > >
> > > > > >
> > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > >
> > > > > > > Hi Tom,
> > > > > > >
> > > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > > >
> > > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > > >
> > > > > > > Thanks Tom
> > > > > > >
> > > > > > > Josh
> > > > > > >
> > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Josh,
> > > > > > > >
> > > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us.ÃâàKFLOP has a max step pulse time of 3.78us.ÃâÃÂ
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > > >
> > > > > > > > I can't think of a simple solution.
> > > > > > > >
> > > > > > > >
> > > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > > >
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: inbilla <inbilla@>
> > > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃâÃÂ
> > > > > > > > Hi There,
> > > > > > > >
> > > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > > >
> > > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > > >
> > > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > > >
> > > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > > >
> > > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > > ch0->Vel=3000;
> > > > > > > > ch0->Accel=2e+005;
> > > > > > > > ch0->Jerk=1e+008;
> > > > > > > > ch0->P=0;
> > > > > > > > ch0->I=0.01;
> > > > > > > > ch0->D=0;
> > > > > > > > ch0->FFAccel=0;
> > > > > > > > ch0->FFVel=0;
> > > > > > > > ch0->MaxI=200;
> > > > > > > > ch0->MaxErr=1e+006;
> > > > > > > > ch0->MaxOutput=200;
> > > > > > > > ch0->DeadBandGain=1;
> > > > > > > > ch0->DeadBandRange=0;
> > > > > > > > ch0->InputChan0=0;
> > > > > > > > ch0->InputChan1=0;
> > > > > > > > ch0->OutputChan0=8;
> > > > > > > > ch0->OutputChan1=0;
> > > > > > > > ch0->MasterAxis=-1;
> > > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > > ch0->InputGain0=1;
> > > > > > > > ch0->InputGain1=1;
> > > > > > > > ch0->InputOffset0=0;
> > > > > > > > ch0->InputOffset1=0;
> > > > > > > > ch0->OutputGain=-1;
> > > > > > > > ch0->OutputOffset=0;
> > > > > > > > ch0->SlaveGain=1;
> > > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > > ch0->BacklashAmount=549;
> > > > > > > > ch0->BacklashRate=1;
> > > > > > > > ch0->invDistPerCycle=1;
> > > > > > > > ch0->Lead=0;
> > > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > > ch0->StepperAmplitude=20;
> > > > > > > >
> > > > > > > > ch0->iir[0].B0=1;
> > > > > > > > ch0->iir[0].B1=0;
> > > > > > > > ch0->iir[0].B2=0;
> > > > > > > > ch0->iir[0].A1=0;
> > > > > > > > ch0->iir[0].A2=0;
> > > > > > > >
> > > > > > > > ch0->iir[1].B0=1;
> > > > > > > > ch0->iir[1].B1=0;
> > > > > > > > ch0->iir[1].B2=0;
> > > > > > > > ch0->iir[1].A1=0;
> > > > > > > > ch0->iir[1].A2=0;
> > > > > > > >
> > > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > > >
> > > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > > >
> > > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > > >
> > > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > > >
> > > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > > >
> > > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > > >
> > > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > > >
> > > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > > >
> > > > > > > > Any help or suggestions would be appreciated!
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > Josh
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5311 |
From: inbilla |
Date: 6/23/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
The direction signal was potentially coming from inside kflop using a c program (as per described in another post)
I can see increasing the step rate inside the KFLOP's config to 4x would make it go 4x the distance. But it would mean interpreter would think that the machine has 4x the resolution, when infact, it "must" always step a multiple of 4 times, otherwise it may send 3 steps through, then reverse direction! in which case, the stepper will only move 1 step in the reverse direction, not the 3 initial steps.
That'd be an issue right?
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> Where would the direction signal come from?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Josh,
> >
> > Actually with normal Quadrature each "Step" makes one quadrature transition and it takes 4 of those to go through a complete A and B quadrature cycle. Using just one of the phases into your driver would only make one step every complete cycle. So you would need to move 4X the distance (in steps) and at 4X the speed but that should not be a problem.
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: inbilla <inbilla@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, June 23, 2012 6:21 PM
> > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> >
> >
> > Â
> > Hi Tom,
> >
> > There aren't any optocouplers on the inputs. There is a 74HC14 on the board, so I assume the inputs are being buffered through that. Though its possible it may only be used to buffer the outputs.
> >
> > Regarding the firmware, there isn't any way that I can mod and build my own firmware is there? The source for the firmware isn't available is it? It wouldn't be my first experience with FPGA's and micros... I recognise though that keeping your current features and implementing mine may be too much to ask.
> >
> > Regarding the Quadrature output. Its worth a shot... but I was under the impression quadrature stepping would step on both a rising and a falling edge of the signal? Is that right? In which case, the driver board would ignore half the steps generated... I've tried looking into it, but nothing seems to come up when I search online for an actual definition of how quadrature mode works to confirm.
> >
> > Thanks for your thoughts, I appreciate your patience
> >
> > Josh
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Josh,
> > > ÃÂ
> > > It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing.ÃÂ I couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
> > > ÃÂ
> > > But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates).ÃÂ For various reasons it turns out to be not easy to do.ÃÂ Not only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
> > > ÃÂ
> > > I was thinking one thing you might try is Quadrature Output Mode.ÃÂ It is selected by adding 8 to the OutputChan0 number.ÃÂ This would basically output a square wave so the pulses would be large.ÃÂ You would lose the direction signal.ÃÂ But for a test you could just disconnect it and wire it to an unused Output and move one direction.ÃÂ If it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the direction.ÃÂ I'm not certain there wouldn't be a flaw where some motion timingÃÂ scenario would cause a Step in the wrong direction, but it seems to me it would work.ÃÂ The KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash).ÃÂ This means that when stepping in one direction the trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite direction.ÃÂ The trajectory must reverse at least
> > 1/8th of a Step
> > > (microstep).ÃÂ So for your relatively slow steppingÃÂ rates this should give enough time.ÃÂ Assuming:
> > > ÃÂ
> > > 10 KHz max microstep rate
> > > acceleration to full speed happens in 1/4 sec
> > > ÃÂ
> > > This is 40000 steps/sec^2 acceleration rate.
> > > ÃÂ
> > > The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
> > > ÃÂ
> > > using acceleration formula:
> > > ÃÂ
> > > distance = 1/2 Acceleration x Time^2
> > > ÃÂ
> > > 1/8 = 1/2 x 40000 t^2
> > > ÃÂ
> > > t = 0.0025 seconds = 2500 us
> > > ÃÂ
> > > Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
> > > ÃÂ
> > > Regards
> > > TKÃÂ
> > > ÃÂ
> > > ÃÂ
> > > ÃÂ
> > >
> > > From: inbilla <inbilla@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, June 23, 2012 10:45 AM
> > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > >
> > >
> > > ÃÂ
> > > Thanks for the thoughts,
> > >
> > > Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
> > >
> > > Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
> > >
> > > The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
> > >
> > > Josh
> > >
> > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Have you tried flipping the polarity?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > >
> > > > > Yeah, it's really strange.
> > > > >
> > > > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > > > >
> > > > > This isn't really making sense.
> > > > >
> > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > >
> > > > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > > > >
> > > > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > > > >
> > > > > > >
> > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > >
> > > > > > > > Hi Tom,
> > > > > > > >
> > > > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > > > >
> > > > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > > > >
> > > > > > > > Thanks Tom
> > > > > > > >
> > > > > > > > Josh
> > > > > > > >
> > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Josh,
> > > > > > > > >
> > > > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us.ÃâàKFLOP has a max step pulse time of 3.78us.ÃâÃÂ
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > > > >
> > > > > > > > > I can't think of a simple solution.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: inbilla <inbilla@>
> > > > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃâÃÂ
> > > > > > > > > Hi There,
> > > > > > > > >
> > > > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > > > >
> > > > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > > > >
> > > > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > > > >
> > > > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > > > >
> > > > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > > > ch0->Vel=3000;
> > > > > > > > > ch0->Accel=2e+005;
> > > > > > > > > ch0->Jerk=1e+008;
> > > > > > > > > ch0->P=0;
> > > > > > > > > ch0->I=0.01;
> > > > > > > > > ch0->D=0;
> > > > > > > > > ch0->FFAccel=0;
> > > > > > > > > ch0->FFVel=0;
> > > > > > > > > ch0->MaxI=200;
> > > > > > > > > ch0->MaxErr=1e+006;
> > > > > > > > > ch0->MaxOutput=200;
> > > > > > > > > ch0->DeadBandGain=1;
> > > > > > > > > ch0->DeadBandRange=0;
> > > > > > > > > ch0->InputChan0=0;
> > > > > > > > > ch0->InputChan1=0;
> > > > > > > > > ch0->OutputChan0=8;
> > > > > > > > > ch0->OutputChan1=0;
> > > > > > > > > ch0->MasterAxis=-1;
> > > > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > > > ch0->InputGain0=1;
> > > > > > > > > ch0->InputGain1=1;
> > > > > > > > > ch0->InputOffset0=0;
> > > > > > > > > ch0->InputOffset1=0;
> > > > > > > > > ch0->OutputGain=-1;
> > > > > > > > > ch0->OutputOffset=0;
> > > > > > > > > ch0->SlaveGain=1;
> > > > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > > > ch0->BacklashAmount=549;
> > > > > > > > > ch0->BacklashRate=1;
> > > > > > > > > ch0->invDistPerCycle=1;
> > > > > > > > > ch0->Lead=0;
> > > > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > > > ch0->StepperAmplitude=20;
> > > > > > > > >
> > > > > > > > > ch0->iir[0].B0=1;
> > > > > > > > > ch0->iir[0].B1=0;
> > > > > > > > > ch0->iir[0].B2=0;
> > > > > > > > > ch0->iir[0].A1=0;
> > > > > > > > > ch0->iir[0].A2=0;
> > > > > > > > >
> > > > > > > > > ch0->iir[1].B0=1;
> > > > > > > > > ch0->iir[1].B1=0;
> > > > > > > > > ch0->iir[1].B2=0;
> > > > > > > > > ch0->iir[1].A1=0;
> > > > > > > > > ch0->iir[1].A2=0;
> > > > > > > > >
> > > > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > > > >
> > > > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > > > >
> > > > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > > > >
> > > > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > > > >
> > > > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > > > >
> > > > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > > > >
> > > > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > > > >
> > > > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > > > >
> > > > > > > > > Any help or suggestions would be appreciated!
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > Josh
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5312 |
From: Tom Kerekes |
Date: 6/24/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Josh,
Hmmm...good point I hadn't thought of. Just moving back and forth one "quadrature transition" where the output would go high and low, and high and low,... would cause the stepper driver to see a step edge one way and not the other so each cycle would cause a shift of one microstep. It would get a bit complicated but because I think this effect is perfectly predictable and detectable then it might be somehow handled. I'm having a hard time coming up with a simple algorithm but I believe a solution exists. Something like:
If the last time we reversed from + to - direction and the output was high, then we know we stepped in that direction, so then the next time we reverse from - to + if the output is
low, then we did not step in that direction, so delay changing the direction until after the output goes high.
I think this will still have an error of 0 or 1 microstep but no more. Is this getting too complicated :}
Regards TK
Group: DynoMotion |
Message: 5325 |
From: inbilla |
Date: 6/24/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Sounds pretty complex, and far worse to verify that it's working...
If I genuinely have no avenue to increase the pulse width then I'll have to find some other way I suppose.
If I were to purchase a KStep. How can I be sure that it would work with my cheap NMEA 23 motors?
If I were to do that, I feel like I need to be confident in making another purchase, since my KFlop appears inappropriate for my current setup... how am I sure I wouldn't be making the same mistake...
Thanks
Josh
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Josh,
>
> Hmmm...good point I hadn't thought of. Just moving back and forth one "quadrature transition" where the output would go high and low, and high and low,... would cause the stepper driver to see a step edge one way and not the other so each cycle would cause a shift of one microstep. It would get a bit complicated but because I think this effect is perfectly predictable and detectable then it might be somehow handled. I'm having a hard time coming up with a simple algorithm but I believe a solution exists. Something like:
>
> If the last time we reversed from + to - direction and the output was high, then we know we stepped in that direction, so then the next time we reverse from - to + if the output is low, then we did not step in that direction, so delay changing the direction until after the output goes high.
>
> I think this will still have an error of 0 or 1 microstep but no more. Is this getting too complicated :}
>
> Regards
> TK
>
>
>
>
>
> ________________________________
> From: inbilla <inbilla@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, June 23, 2012 8:16 PM
> Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
>
>
> Â
> The direction signal was potentially coming from inside kflop using a c program (as per described in another post)
>
> I can see increasing the step rate inside the KFLOP's config to 4x would make it go 4x the distance. But it would mean interpreter would think that the machine has 4x the resolution, when infact, it "must" always step a multiple of 4 times, otherwise it may send 3 steps through, then reverse direction! in which case, the stepper will only move 1 step in the reverse direction, not the 3 initial steps.
> That'd be an issue right?
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > Where would the direction signal come from?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Josh,
> > >
> > > Actually with normal Quadrature each "Step" makes one quadrature transition and it takes 4 of those to go through a complete A and B quadrature cycle.ÃÂ Using just one of the phases into your driver would only make one step every complete cycle.ÃÂ So you would need to move 4X the distance (in steps) and at 4X the speed but that should not be a problem.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: inbilla <inbilla@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, June 23, 2012 6:21 PM
> > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > >
> > >
> > > ÃÂ
> > > Hi Tom,
> > >
> > > There aren't any optocouplers on the inputs. There is a 74HC14 on the board, so I assume the inputs are being buffered through that. Though its possible it may only be used to buffer the outputs.
> > >
> > > Regarding the firmware, there isn't any way that I can mod and build my own firmware is there? The source for the firmware isn't available is it? It wouldn't be my first experience with FPGA's and micros... I recognise though that keeping your current features and implementing mine may be too much to ask.
> > >
> > > Regarding the Quadrature output. Its worth a shot... but I was under the impression quadrature stepping would step on both a rising and a falling edge of the signal? Is that right? In which case, the driver board would ignore half the steps generated... I've tried looking into it, but nothing seems to come up when I search online for an actual definition of how quadrature mode works to confirm.
> > >
> > > Thanks for your thoughts, I appreciate your patience
> > >
> > > Josh
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Josh,
> > > > ÃâÃÂ
> > > > It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing.ÃâàI couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
> > > > ÃâÃÂ
> > > > But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates).ÃâàFor various reasons it turns out to be not easy to do.ÃâàNot only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
> > > > ÃâÃÂ
> > > > I was thinking one thing you might try is Quadrature Output Mode.ÃâàIt is selected by adding 8 to the OutputChan0 number.ÃâàThis would basically output a square wave so the pulses would be large.ÃâàYou would lose the direction signal.ÃâàBut for a test you could just disconnect it and wire it to an unused Output and move one direction.ÃâàIf it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the direction.ÃâàI'm not certain there wouldn't be a flaw where some motion timingÃâàscenario would cause a Step in the wrong direction, but it seems to me it would work.ÃâàThe KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash).ÃâàThis means that when stepping in one direction the trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite
> direction.ÃâàThe trajectory must reverse at least
> > > 1/8th of a Step
> > > > (microstep).ÃâàSo for your relatively slow steppingÃâàrates this should give enough time.ÃâàAssuming:
> > > > ÃâÃÂ
> > > > 10 KHz max microstep rate
> > > > acceleration to full speed happens in 1/4 sec
> > > > ÃâÃÂ
> > > > This is 40000 steps/sec^2 acceleration rate.
> > > > ÃâÃÂ
> > > > The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
> > > > ÃâÃÂ
> > > > using acceleration formula:
> > > > ÃâÃÂ
> > > > distance = 1/2 Acceleration x Time^2
> > > > ÃâÃÂ
> > > > 1/8 = 1/2 x 40000 t^2
> > > > ÃâÃÂ
> > > > t = 0.0025 seconds = 2500 us
> > > > ÃâÃÂ
> > > > Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
> > > > ÃâÃÂ
> > > > Regards
> > > > TKÃâÃÂ
> > > > ÃâÃÂ
> > > > ÃâÃÂ
> > > > ÃâÃÂ
> > > >
> > > > From: inbilla <inbilla@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Saturday, June 23, 2012 10:45 AM
> > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Thanks for the thoughts,
> > > >
> > > > Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
> > > >
> > > > Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
> > > >
> > > > The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
> > > >
> > > > Josh
> > > >
> > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Have you tried flipping the polarity?
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > >
> > > > > > Yeah, it's really strange.
> > > > > >
> > > > > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > > > > >
> > > > > > This isn't really making sense.
> > > > > >
> > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > >
> > > > > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > >
> > > > > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > > > > >
> > > > > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Tom,
> > > > > > > > >
> > > > > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > > > > >
> > > > > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > > > > >
> > > > > > > > > Thanks Tom
> > > > > > > > >
> > > > > > > > > Josh
> > > > > > > > >
> > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Josh,
> > > > > > > > > >
> > > > > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us.ÃÆ'ââ¬Å¡ÃâàKFLOP has a max step pulse time of 3.78us.ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > > > > >
> > > > > > > > > > I can't think of a simple solution.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: inbilla <inbilla@>
> > > > > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > Hi There,
> > > > > > > > > >
> > > > > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > > > > >
> > > > > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > > > > >
> > > > > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > > > > >
> > > > > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > > > > >
> > > > > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > > > > ch0->Vel=3000;
> > > > > > > > > > ch0->Accel=2e+005;
> > > > > > > > > > ch0->Jerk=1e+008;
> > > > > > > > > > ch0->P=0;
> > > > > > > > > > ch0->I=0.01;
> > > > > > > > > > ch0->D=0;
> > > > > > > > > > ch0->FFAccel=0;
> > > > > > > > > > ch0->FFVel=0;
> > > > > > > > > > ch0->MaxI=200;
> > > > > > > > > > ch0->MaxErr=1e+006;
> > > > > > > > > > ch0->MaxOutput=200;
> > > > > > > > > > ch0->DeadBandGain=1;
> > > > > > > > > > ch0->DeadBandRange=0;
> > > > > > > > > > ch0->InputChan0=0;
> > > > > > > > > > ch0->InputChan1=0;
> > > > > > > > > > ch0->OutputChan0=8;
> > > > > > > > > > ch0->OutputChan1=0;
> > > > > > > > > > ch0->MasterAxis=-1;
> > > > > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > > > > ch0->InputGain0=1;
> > > > > > > > > > ch0->InputGain1=1;
> > > > > > > > > > ch0->InputOffset0=0;
> > > > > > > > > > ch0->InputOffset1=0;
> > > > > > > > > > ch0->OutputGain=-1;
> > > > > > > > > > ch0->OutputOffset=0;
> > > > > > > > > > ch0->SlaveGain=1;
> > > > > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > > > > ch0->BacklashAmount=549;
> > > > > > > > > > ch0->BacklashRate=1;
> > > > > > > > > > ch0->invDistPerCycle=1;
> > > > > > > > > > ch0->Lead=0;
> > > > > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > > > > ch0->StepperAmplitude=20;
> > > > > > > > > >
> > > > > > > > > > ch0->iir[0].B0=1;
> > > > > > > > > > ch0->iir[0].B1=0;
> > > > > > > > > > ch0->iir[0].B2=0;
> > > > > > > > > > ch0->iir[0].A1=0;
> > > > > > > > > > ch0->iir[0].A2=0;
> > > > > > > > > >
> > > > > > > > > > ch0->iir[1].B0=1;
> > > > > > > > > > ch0->iir[1].B1=0;
> > > > > > > > > > ch0->iir[1].B2=0;
> > > > > > > > > > ch0->iir[1].A1=0;
> > > > > > > > > > ch0->iir[1].A2=0;
> > > > > > > > > >
> > > > > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > > > > >
> > > > > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > > > > >
> > > > > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > > > > >
> > > > > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > > > > >
> > > > > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > > > > >
> > > > > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > > > > >
> > > > > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > > > > >
> > > > > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > > > > >
> > > > > > > > > > Any help or suggestions would be appreciated!
> > > > > > > > > > Thanks
> > > > > > > > > >
> > > > > > > > > > Josh
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5326 |
From: Tom Kerekes |
Date: 6/25/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Josh,
Very true. You can return the KFLOP and/or a KSTEP if you wish.
Regards TK
Group: DynoMotion |
Message: 5328 |
From: inbilla |
Date: 6/25/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hey Tom,
I'm reluctant to return it, since its a step in the right direction to being truely happy with the machine. Though I am feeling very aware of the fact that I don't know all the variables involved in getting these things to mesh together nicely.
What sort of things in a stepper motor would mean that the KStep wouldn't work with it? Or is there a pretty good chance that it would just work?
Thanks
Josh
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Josh,
>
> Very true. You can return the KFLOP and/or a KSTEP if you wish.
>
> Regards
> TK
>
>
>
> ________________________________
> From: inbilla <inbilla@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, June 24, 2012 9:27 PM
> Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
>
>
> Â
> Sounds pretty complex, and far worse to verify that it's working...
>
> If I genuinely have no avenue to increase the pulse width then I'll have to find some other way I suppose.
>
> If I were to purchase a KStep. How can I be sure that it would work with my cheap NMEA 23 motors?
> If I were to do that, I feel like I need to be confident in making another purchase, since my KFlop appears inappropriate for my current setup... how am I sure I wouldn't be making the same mistake...
>
> Thanks
>
> Josh
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Josh,
> >
> > Hmmm...good point I hadn't thought of.ÃÂ Just moving back and forth one "quadrature transition" where the output would go high and low, and high and low,...ÃÂ would cause the stepper driver to see a step edge one way and not the other so each cycle would cause a shift of one microstep. It would get a bit complicated but because I think this effect is perfectly predictable and detectable then it might be somehow handled.ÃÂ I'm having a hard time coming up with a simple algorithm but I believe a solution exists.ÃÂ Something like:
> >
> > If the last time we reversed from + to - direction and the output was high, then we know we stepped in that direction, so then the next time we reverse from - to + if the output is low, then we did not step in that direction, so delay changing the direction until after the output goes high.
> >
> > I think this will still have an error of 0 or 1 microstep but no more.ÃÂ Is this getting too complicated :}
> >
> > Regards
> > TK
> >
> >
> >
> >
> >
> > ________________________________
> > From: inbilla <inbilla@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, June 23, 2012 8:16 PM
> > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> >
> >
> > ÃÂ
> > The direction signal was potentially coming from inside kflop using a c program (as per described in another post)
> >
> > I can see increasing the step rate inside the KFLOP's config to 4x would make it go 4x the distance. But it would mean interpreter would think that the machine has 4x the resolution, when infact, it "must" always step a multiple of 4 times, otherwise it may send 3 steps through, then reverse direction! in which case, the stepper will only move 1 step in the reverse direction, not the 3 initial steps.
> > That'd be an issue right?
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > Where would the direction signal come from?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Josh,
> > > >
> > > > Actually with normal Quadrature each "Step" makes one quadrature transition and it takes 4 of those to go through a complete A and B quadrature cycle.ÃâàUsing just one of the phases into your driver would only make one step every complete cycle.ÃâàSo you would need to move 4X the distance (in steps) and at 4X the speed but that should not be a problem.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: inbilla <inbilla@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Saturday, June 23, 2012 6:21 PM
> > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Hi Tom,
> > > >
> > > > There aren't any optocouplers on the inputs. There is a 74HC14 on the board, so I assume the inputs are being buffered through that. Though its possible it may only be used to buffer the outputs.
> > > >
> > > > Regarding the firmware, there isn't any way that I can mod and build my own firmware is there? The source for the firmware isn't available is it? It wouldn't be my first experience with FPGA's and micros... I recognise though that keeping your current features and implementing mine may be too much to ask.
> > > >
> > > > Regarding the Quadrature output. Its worth a shot... but I was under the impression quadrature stepping would step on both a rising and a falling edge of the signal? Is that right? In which case, the driver board would ignore half the steps generated... I've tried looking into it, but nothing seems to come up when I search online for an actual definition of how quadrature mode works to confirm.
> > > >
> > > > Thanks for your thoughts, I appreciate your patience
> > > >
> > > > Josh
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Josh,
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing.ÃÆ'ââ¬Å¡ÃâàI couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates).ÃÆ'ââ¬Å¡ÃâàFor various reasons it turns out to be not easy to do.ÃÆ'ââ¬Å¡ÃâàNot only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > I was thinking one thing you might try is Quadrature Output Mode.ÃÆ'ââ¬Å¡ÃâàIt is selected by adding 8 to the OutputChan0 number.ÃÆ'ââ¬Å¡ÃâàThis would basically output a square wave so the pulses would be large.ÃÆ'ââ¬Å¡ÃâàYou would lose the direction signal.ÃÆ'ââ¬Å¡ÃâàBut for a test you could just disconnect it and wire it to an unused Output and move one direction.ÃÆ'ââ¬Å¡ÃâàIf it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the direction.ÃÆ'ââ¬Å¡ÃâàI'm not certain there wouldn't be a flaw where some motion timingÃÆ'ââ¬Å¡Ãâàscenario would cause a Step in the wrong direction, but it seems to me it would work.ÃÆ'ââ¬Å¡ÃâàThe KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash).ÃÆ'ââ¬Å¡ÃâàThis means that when stepping in one direction the
> trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite
> > direction.ÃÆ'ââ¬Å¡ÃâàThe trajectory must reverse at least
> > > > 1/8th of a Step
> > > > > (microstep).ÃÆ'ââ¬Å¡ÃâàSo for your relatively slow steppingÃÆ'ââ¬Å¡Ãâàrates this should give enough time.ÃÆ'ââ¬Å¡ÃâàAssuming:
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > 10 KHz max microstep rate
> > > > > acceleration to full speed happens in 1/4 sec
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > This is 40000 steps/sec^2 acceleration rate.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > using acceleration formula:
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > distance = 1/2 Acceleration x Time^2
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > 1/8 = 1/2 x 40000 t^2
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > t = 0.0025 seconds = 2500 us
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Regards
> > > > > TKÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > >
> > > > > From: inbilla <inbilla@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Saturday, June 23, 2012 10:45 AM
> > > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Thanks for the thoughts,
> > > > >
> > > > > Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
> > > > >
> > > > > Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
> > > > >
> > > > > The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
> > > > >
> > > > > Josh
> > > > >
> > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Have you tried flipping the polarity?
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > >
> > > > > > > Yeah, it's really strange.
> > > > > > >
> > > > > > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > > > > > >
> > > > > > > This isn't really making sense.
> > > > > > >
> > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > > >
> > > > > > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > >
> > > > > > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > > > > > >
> > > > > > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Tom,
> > > > > > > > > >
> > > > > > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > > > > > >
> > > > > > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > > > > > >
> > > > > > > > > > Thanks Tom
> > > > > > > > > >
> > > > > > > > > > Josh
> > > > > > > > > >
> > > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Josh,
> > > > > > > > > > >
> > > > > > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàKFLOP has a max step pulse time of 3.78us.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > > > > > >
> > > > > > > > > > > I can't think of a simple solution.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: inbilla <inbilla@>
> > > > > > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > Hi There,
> > > > > > > > > > >
> > > > > > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > > > > > >
> > > > > > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > > > > > >
> > > > > > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > > > > > >
> > > > > > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > > > > > >
> > > > > > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > > > > > ch0->Vel=3000;
> > > > > > > > > > > ch0->Accel=2e+005;
> > > > > > > > > > > ch0->Jerk=1e+008;
> > > > > > > > > > > ch0->P=0;
> > > > > > > > > > > ch0->I=0.01;
> > > > > > > > > > > ch0->D=0;
> > > > > > > > > > > ch0->FFAccel=0;
> > > > > > > > > > > ch0->FFVel=0;
> > > > > > > > > > > ch0->MaxI=200;
> > > > > > > > > > > ch0->MaxErr=1e+006;
> > > > > > > > > > > ch0->MaxOutput=200;
> > > > > > > > > > > ch0->DeadBandGain=1;
> > > > > > > > > > > ch0->DeadBandRange=0;
> > > > > > > > > > > ch0->InputChan0=0;
> > > > > > > > > > > ch0->InputChan1=0;
> > > > > > > > > > > ch0->OutputChan0=8;
> > > > > > > > > > > ch0->OutputChan1=0;
> > > > > > > > > > > ch0->MasterAxis=-1;
> > > > > > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > > > > > ch0->InputGain0=1;
> > > > > > > > > > > ch0->InputGain1=1;
> > > > > > > > > > > ch0->InputOffset0=0;
> > > > > > > > > > > ch0->InputOffset1=0;
> > > > > > > > > > > ch0->OutputGain=-1;
> > > > > > > > > > > ch0->OutputOffset=0;
> > > > > > > > > > > ch0->SlaveGain=1;
> > > > > > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > > > > > ch0->BacklashAmount=549;
> > > > > > > > > > > ch0->BacklashRate=1;
> > > > > > > > > > > ch0->invDistPerCycle=1;
> > > > > > > > > > > ch0->Lead=0;
> > > > > > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > > > > > ch0->StepperAmplitude=20;
> > > > > > > > > > >
> > > > > > > > > > > ch0->iir[0].B0=1;
> > > > > > > > > > > ch0->iir[0].B1=0;
> > > > > > > > > > > ch0->iir[0].B2=0;
> > > > > > > > > > > ch0->iir[0].A1=0;
> > > > > > > > > > > ch0->iir[0].A2=0;
> > > > > > > > > > >
> > > > > > > > > > > ch0->iir[1].B0=1;
> > > > > > > > > > > ch0->iir[1].B1=0;
> > > > > > > > > > > ch0->iir[1].B2=0;
> > > > > > > > > > > ch0->iir[1].A1=0;
> > > > > > > > > > > ch0->iir[1].A2=0;
> > > > > > > > > > >
> > > > > > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > > > > > >
> > > > > > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > > > > > >
> > > > > > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > > > > > >
> > > > > > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > > > > > >
> > > > > > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > > > > > >
> > > > > > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > > > > > >
> > > > > > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > > > > > >
> > > > > > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > > > > > >
> > > > > > > > > > > Any help or suggestions would be appreciated!
> > > > > > > > > > > Thanks
> > > > > > > > > > >
> > > > > > > > > > > Josh
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5330 |
From: Tom Kerekes |
Date: 6/26/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Josh,
There is a good chance it would work if it is a 2 phase Nema23 size. What are the motor specs? Current? Resistance? Inductance?
Regards
TK
Group: DynoMotion |
Message: 5341 |
From: inbilla |
Date: 6/26/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Yeah,
2 phase NEMA 23
RPM: 3000
Voltage: 3.46VDC
Current: 1.5A
Winding resistance: 2.7ohm
Inductance: 5.6mH
Thanks for the advice Tom, let me know what you think?
Josh
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Josh,
> Â
> There is a good chance it would work if it is a 2 phase Nema23 size. What are the motor specs? Current? Resistance? Inductance?Â
> Â
> Regards
> TK
>
> From: inbilla <inbilla@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, June 25, 2012 6:09 PM
> Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
>
>
> Â
> Hey Tom,
>
> I'm reluctant to return it, since its a step in the right direction to being truely happy with the machine. Though I am feeling very aware of the fact that I don't know all the variables involved in getting these things to mesh together nicely.
>
> What sort of things in a stepper motor would mean that the KStep wouldn't work with it? Or is there a pretty good chance that it would just work?
>
> Thanks
>
> Josh
>
> --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Josh,
> >
> > Very true.ÃÂ You can return the KFLOP and/or a KSTEP if you wish.
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: inbilla <inbilla@>
> > To: mailto:DynoMotion%40yahoogroups.com
> > Sent: Sunday, June 24, 2012 9:27 PM
> > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> >
> >
> > ÃÂ
> > Sounds pretty complex, and far worse to verify that it's working...
> >
> > If I genuinely have no avenue to increase the pulse width then I'll have to find some other way I suppose.
> >
> > If I were to purchase a KStep. How can I be sure that it would work with my cheap NMEA 23 motors?
> > If I were to do that, I feel like I need to be confident in making another purchase, since my KFlop appears inappropriate for my current setup... how am I sure I wouldn't be making the same mistake...
> >
> > Thanks
> >
> > Josh
> >
> > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Josh,
> > >
> > > Hmmm...good point I hadn't thought of.ÃâàJust moving back and forth one "quadrature transition" where the output would go high and low, and high and low,...Ãâàwould cause the stepper driver to see a step edge one way and not the other so each cycle would cause a shift of one microstep. It would get a bit complicated but because I think this effect is perfectly predictable and detectable then it might be somehow handled.ÃâàI'm having a hard time coming up with a simple algorithm but I believe a solution exists.ÃâàSomething like:
> > >
> > > If the last time we reversed from + to - direction and the output was high, then we know we stepped in that direction, so then the next time we reverse from - to + if the output is low, then we did not step in that direction, so delay changing the direction until after the output goes high.
> > >
> > > I think this will still have an error of 0 or 1 microstep but no more.ÃâàIs this getting too complicated :}
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: inbilla <inbilla@>
> > > To: mailto:DynoMotion%40yahoogroups.com
> > > Sent: Saturday, June 23, 2012 8:16 PM
> > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > >
> > >
> > > ÃâÃÂ
> > > The direction signal was potentially coming from inside kflop using a c program (as per described in another post)
> > >
> > > I can see increasing the step rate inside the KFLOP's config to 4x would make it go 4x the distance. But it would mean interpreter would think that the machine has 4x the resolution, when infact, it "must" always step a multiple of 4 times, otherwise it may send 3 steps through, then reverse direction! in which case, the stepper will only move 1 step in the reverse direction, not the 3 initial steps.
> > > That'd be an issue right?
> > >
> > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > Where would the direction signal come from?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Josh,
> > > > >
> > > > > Actually with normal Quadrature each "Step" makes one quadrature transition and it takes 4 of those to go through a complete A and B quadrature cycle.ÃÆ'ââ¬Å¡ÃâàUsing just one of the phases into your driver would only make one step every complete cycle.ÃÆ'ââ¬Å¡ÃâàSo you would need to move 4X the distance (in steps) and at 4X the speed but that should not be a problem.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: inbilla <inbilla@>
> > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > Sent: Saturday, June 23, 2012 6:21 PM
> > > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Hi Tom,
> > > > >
> > > > > There aren't any optocouplers on the inputs. There is a 74HC14 on the board, so I assume the inputs are being buffered through that. Though its possible it may only be used to buffer the outputs.
> > > > >
> > > > > Regarding the firmware, there isn't any way that I can mod and build my own firmware is there? The source for the firmware isn't available is it? It wouldn't be my first experience with FPGA's and micros... I recognise though that keeping your current features and implementing mine may be too much to ask.
> > > > >
> > > > > Regarding the Quadrature output. Its worth a shot... but I was under the impression quadrature stepping would step on both a rising and a falling edge of the signal? Is that right? In which case, the driver board would ignore half the steps generated... I've tried looking into it, but nothing seems to come up when I search online for an actual definition of how quadrature mode works to confirm.
> > > > >
> > > > > Thanks for your thoughts, I appreciate your patience
> > > > >
> > > > > Josh
> > > > >
> > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Josh,
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates).ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàFor various reasons it turns out to be not easy to do.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàNot only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > I was thinking one thing you might try is Quadrature Output Mode.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt is selected by adding 8 to the OutputChan0 number.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThis would basically output a square wave so the pulses would be large.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou would lose the direction signal.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut for a test you could just disconnect it and wire it to an unused Output and move one direction.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIf it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the direction.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI'm not certain there wouldn't be a flaw where some motion timingÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàscenario would cause a Step in the wrong direction, but it seems to me it would
> work.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash).ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThis means that when stepping in one direction the
> > trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite
> > > direction.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe trajectory must reverse at least
> > > > > 1/8th of a Step
> > > > > > (microstep).ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for your relatively slow steppingÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàrates this should give enough time.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàAssuming:
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > 10 KHz max microstep rate
> > > > > > acceleration to full speed happens in 1/4 sec
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > This is 40000 steps/sec^2 acceleration rate.
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > using acceleration formula:
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > distance = 1/2 Acceleration x Time^2
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > 1/8 = 1/2 x 40000 t^2
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > t = 0.0025 seconds = 2500 us
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Regards
> > > > > > TKÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > >
> > > > > > From: inbilla <inbilla@>
> > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > Sent: Saturday, June 23, 2012 10:45 AM
> > > > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > > > >
> > > > > >
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Thanks for the thoughts,
> > > > > >
> > > > > > Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
> > > > > >
> > > > > > Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
> > > > > >
> > > > > > The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > >
> > > > > > > Have you tried flipping the polarity?
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > >
> > > > > > > > Yeah, it's really strange.
> > > > > > > >
> > > > > > > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > > > > > > >
> > > > > > > > This isn't really making sense.
> > > > > > > >
> > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > > > >
> > > > > > > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > > Ray L.
> > > > > > > > >
> > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > > >
> > > > > > > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > > > > > > >
> > > > > > > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Tom,
> > > > > > > > > > >
> > > > > > > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > > > > > > >
> > > > > > > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > > > > > > >
> > > > > > > > > > > Thanks Tom
> > > > > > > > > > >
> > > > > > > > > > > Josh
> > > > > > > > > > >
> > > > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Josh,
> > > > > > > > > > > >
> > > > > > > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàKFLOP has a max step pulse time of 3.78us.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > > > > > > >
> > > > > > > > > > > > I can't think of a simple solution.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: inbilla <inbilla@>
> > > > > > > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > Hi There,
> > > > > > > > > > > >
> > > > > > > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > > > > > > >
> > > > > > > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > > > > > > >
> > > > > > > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > > > > > > >
> > > > > > > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > > > > > > >
> > > > > > > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > > > > > > ch0->Vel=3000;
> > > > > > > > > > > > ch0->Accel=2e+005;
> > > > > > > > > > > > ch0->Jerk=1e+008;
> > > > > > > > > > > > ch0->P=0;
> > > > > > > > > > > > ch0->I=0.01;
> > > > > > > > > > > > ch0->D=0;
> > > > > > > > > > > > ch0->FFAccel=0;
> > > > > > > > > > > > ch0->FFVel=0;
> > > > > > > > > > > > ch0->MaxI=200;
> > > > > > > > > > > > ch0->MaxErr=1e+006;
> > > > > > > > > > > > ch0->MaxOutput=200;
> > > > > > > > > > > > ch0->DeadBandGain=1;
> > > > > > > > > > > > ch0->DeadBandRange=0;
> > > > > > > > > > > > ch0->InputChan0=0;
> > > > > > > > > > > > ch0->InputChan1=0;
> > > > > > > > > > > > ch0->OutputChan0=8;
> > > > > > > > > > > > ch0->OutputChan1=0;
> > > > > > > > > > > > ch0->MasterAxis=-1;
> > > > > > > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > > > > > > ch0->InputGain0=1;
> > > > > > > > > > > > ch0->InputGain1=1;
> > > > > > > > > > > > ch0->InputOffset0=0;
> > > > > > > > > > > > ch0->InputOffset1=0;
> > > > > > > > > > > > ch0->OutputGain=-1;
> > > > > > > > > > > > ch0->OutputOffset=0;
> > > > > > > > > > > > ch0->SlaveGain=1;
> > > > > > > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > > > > > > ch0->BacklashAmount=549;
> > > > > > > > > > > > ch0->BacklashRate=1;
> > > > > > > > > > > > ch0->invDistPerCycle=1;
> > > > > > > > > > > > ch0->Lead=0;
> > > > > > > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > > > > > > ch0->StepperAmplitude=20;
> > > > > > > > > > > >
> > > > > > > > > > > > ch0->iir[0].B0=1;
> > > > > > > > > > > > ch0->iir[0].B1=0;
> > > > > > > > > > > > ch0->iir[0].B2=0;
> > > > > > > > > > > > ch0->iir[0].A1=0;
> > > > > > > > > > > > ch0->iir[0].A2=0;
> > > > > > > > > > > >
> > > > > > > > > > > > ch0->iir[1].B0=1;
> > > > > > > > > > > > ch0->iir[1].B1=0;
> > > > > > > > > > > > ch0->iir[1].B2=0;
> > > > > > > > > > > > ch0->iir[1].A1=0;
> > > > > > > > > > > > ch0->iir[1].A2=0;
> > > > > > > > > > > >
> > > > > > > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > > > > > > >
> > > > > > > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > > > > > > >
> > > > > > > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > > > > > > >
> > > > > > > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > > > > > > >
> > > > > > > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > > > > > > >
> > > > > > > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > > > > > > >
> > > > > > > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > > > > > > >
> > > > > > > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > > > > > > >
> > > > > > > > > > > > Any help or suggestions would be appreciated!
> > > > > > > > > > > > Thanks
> > > > > > > > > > > >
> > > > > > > > > > > > Josh
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 5346 |
From: Tom Kerekes |
Date: 6/26/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
Hi Josh,
That should work. The current jumpers on KSTEP should be set for 1.25A (only Jumper L). Probably a 48V Supply would be needed for maximum speed, but you could start with something lower to see what you can get.
Are there just 4 wires?
Regards
TK
Group: DynoMotion |
Message: 5348 |
From: inbilla |
Date: 6/26/2012 |
Subject: Re: KFLOP issues driving an LPT driver board TB6560 |
That sounds promising,
Yeah, they have only 4 wires
Thanks
Josh
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Josh,
> Â
> That should work. The current jumpers on KSTEP should be set for 1.25A (only Jumper L). Probably a 48V Supply would be needed for maximum speed, but you could start with something lower to see what you can get.
> Â
> Are there just 4 wires?
> Â
> Regards
> TK
>
> From: inbilla <inbilla@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, June 26, 2012 5:24 PM
> Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
>
>
> Â
> Yeah,
> 2 phase NEMA 23
>
> RPM: 3000
> Voltage: 3.46VDC
> Current: 1.5A
> Winding resistance: 2.7ohm
> Inductance: 5.6mH
>
> Thanks for the advice Tom, let me know what you think?
>
> Josh
>
> --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Josh,
> > ÃÂ
> > There is aÃÂ good chance it would work if it is a 2 phase Nema23 size.ÃÂ What are the motor specs?ÃÂ Current?ÃÂ Resistance?ÃÂ Inductance?ÃÂ
> > ÃÂ
> > Regards
> > TK
> >
> > From: inbilla <inbilla@>
> > To: mailto:DynoMotion%40yahoogroups.com
> > Sent: Monday, June 25, 2012 6:09 PM
> > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> >
> >
> > ÃÂ
> > Hey Tom,
> >
> > I'm reluctant to return it, since its a step in the right direction to being truely happy with the machine. Though I am feeling very aware of the fact that I don't know all the variables involved in getting these things to mesh together nicely.
> >
> > What sort of things in a stepper motor would mean that the KStep wouldn't work with it? Or is there a pretty good chance that it would just work?
> >
> > Thanks
> >
> > Josh
> >
> > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Josh,
> > >
> > > Very true.ÃâàYou can return the KFLOP and/or a KSTEP if you wish.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: inbilla <inbilla@>
> > > To: mailto:DynoMotion%40yahoogroups.com
> > > Sent: Sunday, June 24, 2012 9:27 PM
> > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > >
> > >
> > > ÃâÃÂ
> > > Sounds pretty complex, and far worse to verify that it's working...
> > >
> > > If I genuinely have no avenue to increase the pulse width then I'll have to find some other way I suppose.
> > >
> > > If I were to purchase a KStep. How can I be sure that it would work with my cheap NMEA 23 motors?
> > > If I were to do that, I feel like I need to be confident in making another purchase, since my KFlop appears inappropriate for my current setup... how am I sure I wouldn't be making the same mistake...
> > >
> > > Thanks
> > >
> > > Josh
> > >
> > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Josh,
> > > >
> > > > Hmmm...good point I hadn't thought of.ÃÆ'ââ¬Å¡ÃâàJust moving back and forth one "quadrature transition" where the output would go high and low, and high and low,...ÃÆ'ââ¬Å¡Ãâàwould cause the stepper driver to see a step edge one way and not the other so each cycle would cause a shift of one microstep. It would get a bit complicated but because I think this effect is perfectly predictable and detectable then it might be somehow handled.ÃÆ'ââ¬Å¡ÃâàI'm having a hard time coming up with a simple algorithm but I believe a solution exists.ÃÆ'ââ¬Å¡ÃâàSomething like:
> > > >
> > > > If the last time we reversed from + to - direction and the output was high, then we know we stepped in that direction, so then the next time we reverse from - to + if the output is low, then we did not step in that direction, so delay changing the direction until after the output goes high.
> > > >
> > > > I think this will still have an error of 0 or 1 microstep but no more.ÃÆ'ââ¬Å¡ÃâàIs this getting too complicated :}
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: inbilla <inbilla@>
> > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > Sent: Saturday, June 23, 2012 8:16 PM
> > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > >
> > > >
> > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > The direction signal was potentially coming from inside kflop using a c program (as per described in another post)
> > > >
> > > > I can see increasing the step rate inside the KFLOP's config to 4x would make it go 4x the distance. But it would mean interpreter would think that the machine has 4x the resolution, when infact, it "must" always step a multiple of 4 times, otherwise it may send 3 steps through, then reverse direction! in which case, the stepper will only move 1 step in the reverse direction, not the 3 initial steps.
> > > > That'd be an issue right?
> > > >
> > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > Where would the direction signal come from?
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Josh,
> > > > > >
> > > > > > Actually with normal Quadrature each "Step" makes one quadrature transition and it takes 4 of those to go through a complete A and B quadrature cycle.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàUsing just one of the phases into your driver would only make one step every complete cycle.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo you would need to move 4X the distance (in steps) and at 4X the speed but that should not be a problem.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: inbilla <inbilla@>
> > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > Sent: Saturday, June 23, 2012 6:21 PM
> > > > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > > > >
> > > > > >
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Hi Tom,
> > > > > >
> > > > > > There aren't any optocouplers on the inputs. There is a 74HC14 on the board, so I assume the inputs are being buffered through that. Though its possible it may only be used to buffer the outputs.
> > > > > >
> > > > > > Regarding the firmware, there isn't any way that I can mod and build my own firmware is there? The source for the firmware isn't available is it? It wouldn't be my first experience with FPGA's and micros... I recognise though that keeping your current features and implementing mine may be too much to ask.
> > > > > >
> > > > > > Regarding the Quadrature output. Its worth a shot... but I was under the impression quadrature stepping would step on both a rising and a falling edge of the signal? Is that right? In which case, the driver board would ignore half the steps generated... I've tried looking into it, but nothing seems to come up when I search online for an actual definition of how quadrature mode works to confirm.
> > > > > >
> > > > > > Thanks for your thoughts, I appreciate your patience
> > > > > >
> > > > > > Josh
> > > > > >
> > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Josh,
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > It might be a combination of things: pulse width, voltage levels, and polarity that are making things confusing.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI couldn't find any spec for your board - only the Chip. Are there opto couplers? How are they configured?
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > But sorry we don't have firmware that generates pulses that long. KFLOP was intended to be used in high-speed applications (MHz Step Rates).ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàFor various reasons it turns out to be not easy to do.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàNot only technically, but from an FPGA resource standpoint, and backward compatibility, and required additional options, maintain special firmware, etc...
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > I was thinking one thing you might try is Quadrature Output Mode.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt is selected by adding 8 to the OutputChan0 number.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThis would basically output a square wave so the pulses would be large.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou would lose the direction signal.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut for a test you could just disconnect it and wire it to an unused Output and move one direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIf it worked you might be able to control the direction in software using a C program which would monitor the direction of the trajectory and set the
> direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI'm not certain there wouldn't be a flaw where some motion timingÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàscenario would cause a Step in the wrong direction, but it seems to me it would
> > work.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe KFLOP Step/Dir generators have a built in 1/8th microstep of hysteresis (backlash).ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThis means that when stepping in one direction the
> > > trajectory cannot suddenly reverse some microscopic amount and generate a Step in the opposite
> > > > direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe trajectory must reverse at least
> > > > > > 1/8th of a Step
> > > > > > > (microstep).ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for your relatively slow steppingÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàrates this should give enough time.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàAssuming:
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > 10 KHz max microstep rate
> > > > > > > acceleration to full speed happens in 1/4 sec
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > This is 40000 steps/sec^2 acceleration rate.
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > The time to go from a complete stop, accelerate at max acceleration, and traverse 1/8th of a microstep would be:
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > using acceleration formula:
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > distance = 1/2 Acceleration x Time^2
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > 1/8 = 1/2 x 40000 t^2
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > t = 0.0025 seconds = 2500 us
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Since KFLOP C Programs execute every 180us there should be ample time to detect the change in direction and set a direction bit.
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Regards
> > > > > > > TKÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > > From: inbilla <inbilla@>
> > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > Sent: Saturday, June 23, 2012 10:45 AM
> > > > > > > Subject: [DynoMotion] Re: KFLOP issues driving an LPT driver board TB6560
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Thanks for the thoughts,
> > > > > > >
> > > > > > > Yeah, I've tried flipping the polarity (both when trying to get Mach3/LPT to work, and getting KMotionCNC/KFLOP to work).
> > > > > > >
> > > > > > > Having it inverted (idle high, pulse low) does give better results. But they still aren't reliable results. Especially at low speeds the motors tend to stutter.
> > > > > > >
> > > > > > > The more I think about it and attempt to get it to work, the more it seems I need to increase the pulse width. The Arduino output was so smooth when the pulse was wider. I'm beginning to wonder if I can put a circuit between the boards and convert the pulse widths?
> > > > > > >
> > > > > > > Josh
> > > > > > >
> > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > > >
> > > > > > > > Have you tried flipping the polarity?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > >
> > > > > > > > > Yeah, it's really strange.
> > > > > > > > >
> > > > > > > > > I can view the pulses coming from Mach3 in Parallel port mode, and they're 4us. The stepper appears to work fine, and is quite smooth...
> > > > > > > > >
> > > > > > > > > This isn't really making sense.
> > > > > > > > >
> > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > > > > >
> > > > > > > > > > That will also limit you to relatively slow step rates, which may mean slow rapid speeds....
> > > > > > > > > >
> > > > > > > > > > Regards,
> > > > > > > > > > Ray L.
> > > > > > > > > >
> > > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > On your advice, I've tried hooking up an Arduino instead of the KFLOP to the pins. You're right, the min pulse width for this particular board appears to be around 90us with 16x microstepping, and much higher with no microstepping enabled.
> > > > > > > > > > >
> > > > > > > > > > > I guess my only hope is to find custom firmware? or find a stepper driver that supports 4us?
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, "inbilla" <inbilla@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks for your diagnosis, I had a feeling it was going to be something like that. I've been looking for somewhere to get that information from. Thanks for hunting it down!
> > > > > > > > > > > >
> > > > > > > > > > > > I guess the question is... Is it possible to get a version of the kflop firmware that supports a broader range of pulse widths?
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks Tom
> > > > > > > > > > > >
> > > > > > > > > > > > Josh
> > > > > > > > > > > >
> > > > > > > > > > > > --- In mailto:DynoMotion%40yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Josh,
> > > > > > > > > > > > >
> > > > > > > > > > > > > It looks like the TB6560 has a minimum Step Pulse time of 30us.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàKFLOP has a max step pulse time of 3.78us.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > http://www.toshiba.com/taec/components2/Datasheet_Sync/382/27885.pdf
> > > > > > > > > > > > >
> > > > > > > > > > > > > I can't think of a simple solution.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > When you were driving with the LPT what pulse width were you using?
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > > TK
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > From: inbilla <inbilla@>
> > > > > > > > > > > > > To: mailto:DynoMotion%40yahoogroups.com
> > > > > > > > > > > > > Sent: Friday, June 22, 2012 11:27 PM
> > > > > > > > > > > > > Subject: [DynoMotion] KFLOP issues driving an LPT driver board TB6560
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > Hi There,
> > > > > > > > > > > > >
> > > > > > > > > > > > > I am currently having issues getting the KFLOP to drive my stepper motors for my CNC. The driver board is based on the TB6560 amplifier, and is usually connected to an LPT Port.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have created a board to map JP7 to the LPT port header appropriately, and all the signals look fine. However, when I attempt to step the motors using KMotionCNC, the steppers seem to stutter back and forth, and don't work properly.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have found that stepping at slower speeds tends to result in stutter. Stepping at higher speeds will stall the motors (expected). And stepping at medium speeds will sometimes work nicely.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I currently have one axis configured. The following is the C code for that:
> > > > > > > > > > > > >
> > > > > > > > > > > > > ch0->InputMode=NO_INPUT_MODE;
> > > > > > > > > > > > > ch0->OutputMode=STEP_DIR_MODE;
> > > > > > > > > > > > > ch0->Vel=3000;
> > > > > > > > > > > > > ch0->Accel=2e+005;
> > > > > > > > > > > > > ch0->Jerk=1e+008;
> > > > > > > > > > > > > ch0->P=0;
> > > > > > > > > > > > > ch0->I=0.01;
> > > > > > > > > > > > > ch0->D=0;
> > > > > > > > > > > > > ch0->FFAccel=0;
> > > > > > > > > > > > > ch0->FFVel=0;
> > > > > > > > > > > > > ch0->MaxI=200;
> > > > > > > > > > > > > ch0->MaxErr=1e+006;
> > > > > > > > > > > > > ch0->MaxOutput=200;
> > > > > > > > > > > > > ch0->DeadBandGain=1;
> > > > > > > > > > > > > ch0->DeadBandRange=0;
> > > > > > > > > > > > > ch0->InputChan0=0;
> > > > > > > > > > > > > ch0->InputChan1=0;
> > > > > > > > > > > > > ch0->OutputChan0=8;
> > > > > > > > > > > > > ch0->OutputChan1=0;
> > > > > > > > > > > > > ch0->MasterAxis=-1;
> > > > > > > > > > > > > ch0->LimitSwitchOptions=0x7070020;//0x7070003;
> > > > > > > > > > > > > ch0->InputGain0=1;
> > > > > > > > > > > > > ch0->InputGain1=1;
> > > > > > > > > > > > > ch0->InputOffset0=0;
> > > > > > > > > > > > > ch0->InputOffset1=0;
> > > > > > > > > > > > > ch0->OutputGain=-1;
> > > > > > > > > > > > > ch0->OutputOffset=0;
> > > > > > > > > > > > > ch0->SlaveGain=1;
> > > > > > > > > > > > > ch0->BacklashMode=BACKLASH_OFF;
> > > > > > > > > > > > > ch0->BacklashAmount=549;
> > > > > > > > > > > > > ch0->BacklashRate=1;
> > > > > > > > > > > > > ch0->invDistPerCycle=1;
> > > > > > > > > > > > > ch0->Lead=0;
> > > > > > > > > > > > > ch0->MaxFollowingError=1000000000;
> > > > > > > > > > > > > ch0->StepperAmplitude=20;
> > > > > > > > > > > > >
> > > > > > > > > > > > > ch0->iir[0].B0=1;
> > > > > > > > > > > > > ch0->iir[0].B1=0;
> > > > > > > > > > > > > ch0->iir[0].B2=0;
> > > > > > > > > > > > > ch0->iir[0].A1=0;
> > > > > > > > > > > > > ch0->iir[0].A2=0;
> > > > > > > > > > > > >
> > > > > > > > > > > > > ch0->iir[1].B0=1;
> > > > > > > > > > > > > ch0->iir[1].B1=0;
> > > > > > > > > > > > > ch0->iir[1].B2=0;
> > > > > > > > > > > > > ch0->iir[1].A1=0;
> > > > > > > > > > > > > ch0->iir[1].A2=0;
> > > > > > > > > > > > >
> > > > > > > > > > > > > ch0->iir[2].B0=0.000769;
> > > > > > > > > > > > > ch0->iir[2].B1=0.001538;
> > > > > > > > > > > > > ch0->iir[2].B2=0.000769;
> > > > > > > > > > > > > ch0->iir[2].A1=1.92076;
> > > > > > > > > > > > > ch0->iir[2].A2=-0.923833;
> > > > > > > > > > > > >
> > > > > > > > > > > > > I thought perhaps the step pulse width, and/or polarity weren't right for this board, so I added the following line too:
> > > > > > > > > > > > >
> > > > > > > > > > > > > FPGA(STEP_PULSE_LENGTH_ADD)= 62;// + 0x80;
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have tried both with and without bit 7 to change the polarity. But it doesn't seem to make any difference.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have also thought perhaps the LVTTL output of 3.3v isn't enough, so I've even tried converting the voltage up to 5v, however it doesn't seem to have made any difference.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I can only imagine that either my KFLOP is faulty? Or the above configuration of the axis is incorrect?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Does anyone have any thoughts on where I should go from here? I've come up against a wall now...
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have also posted on the forum from where I got the driver board/CNC kit. The forum post there is:
> > > > > > > > > > > > > http://forums.zentoolworks.com/viewtopic.php?f=11&t=2042
> > > > > > > > > > > > >
> > > > > > > > > > > > > Any help or suggestions would be appreciated!
> > > > > > > > > > > > > Thanks
> > > > > > > > > > > > >
> > > > > > > > > > > > > Josh
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
| | | | | | | | | | | | | |